import request from '../../api/request'

// 头部滚动数据 /api/v1/pay/promotion/record/success-promotion 
export function transactionRecord(data) {
    return request.get('/api/v1/pay/promotion/record/success-promotion ', data).then(res => {
        return res.data.data
    })
}


// 我的总收入,可提现收入 /api/v1/pay/promotion/record/my-commission-info
export function commission(data) {
    return request.get('/api/v1/pay/promotion/record/my-commission-info', data).then(res => {
        return res.data.data
    })
}

// 我的推荐客户列表 /api/v1/pay/promotion/record/my-custom-list
export function recommendList(data) {
    return request.get('/api/v1/pay/promotion/record/my-custom-list', data).then(res => {
        return res.data.data
    })
}
// 生成二维码
export function generateQrCode(data) {
    return request.post('/api/v1/pay/promotion/record/qrcode-info', data).then(res => {
        return res.data.data
    })
}

// 精准推广弹窗 /api/v1/pay/promotion/record/precise
export function preciseExtension(data) {
    return request.post('/api/v1/pay/promotion/record/precise', data).then(res => {
        return res.data.data
    })
}
// 修改精准推广信息  /api/v1/pay/promotion/record/precise-custom-info
export function modifyPreciseExtension(data) {
    return request.put('/api/v1/pay/promotion/record/precise-custom-info', data).then(res => {
        return res.data.data
    })
}

// 被邀请页面信息接口 /api/v1/pay/promotion/record/referrer-info
export function getEstablishInfo(data) {
    return request.get('/api/v1/pay/promotion/record/referrer-info', data).then(res => {
        return res.data.data
    })  
}
// 被邀请人填写信息 /api/v1/pay/promotion/record/scope
export function beInvitedInfo(data) {
    return request.post('/api/v1/pay/promotion/record/scope', data).then(res => {
        return res.data.data
    })
}
/**
 * 年度账单和分享活动
*/
// 创建二维码信息
export function getQrcodeInfo(data) {
    return request.post('/api/v1/pay/promotion/record/qrcode-info', data).then(res => {
        return res.data.data
    })
}
// 精准推广录入信息
export function createPrecise(data) {
    return request.post('/api/v1/pay/promotion/record/precise', data).then(res => {
        return res.data.data
    })
}
// 根据推广id获取B端推广用户信息
export function getReferrerInfo(data) {
    return request.get('/api/v1/pay/promotion/record/referrer-info', data).then(res => {
        return res.data.data
    })
}
// 群发推广录入信息
export function recordScope(data) {
    return request.post('/api/v1/pay/promotion/record/scope', data).then(res => {
        return res.data.data
    })
}
// 修改被推广人信息
export function preciseCustomInfo(data) {
    return request.put('/api/v1/pay/promotion/record/precise-custom-info', data).then(res => {
        return res.data.data
    })
}
// 获取推荐人所属销售信息
export function getSalesPhone(data) {
    return request.get('/api/v1/pay/promotion/record/co-sales-phone', data).then(res => {
        return res.data.data
    })
}

// B端查询查询个人年度账单数据
export function queryUserReport(data) {
    return request.get('/api/v1/pay/user/use/report/query-user-report', data).then(res => {
        return res.data.data
    })
}

// 垫资报名 
export function signUpAdvancePayment(data) {
    return request.post('/api/v1/pay/manager/adv-promotion-record', data).then(res => {
        return res.data.data
    })
}